(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Super Expander (1982)(Commodore)"

SUMMARY OF 
SUPER EXPANDER COMMANDS 



Operation Synrtjt p 0fie 

Change function key assignment KEY 

or KEY n. "entry" .. 4 

Select graph) esse* GRAPHICn 7 

Choose colors CCXQ* scMch.au . , ,' 

PloipoinHs) POINT cr.x.y 

o- POINT civ..y,><'.yl B 

QSange character color REGION C 8 

Draw line(s) DRAW cr,x,y TO »1 ,yl 

or DRAW cr^y TO «I.yl TO 

orDRAW C rTO*,y . ? 

Draw circular shope CIRCLE <r,*,y,ni ,ry 9 

Draw arc CIRCLE cr,x,y ( r>< .ry.as.al 9 

Point enclosed area PAINT cr,x,y ., ? 

Display tea) on a graphics screen CHAR row,column.' 'text" 1 

Clear o graphics screen SCNClR 10 

Ploy o chord SOUND $1,52,53,54,55 , 11 

En»r single note mus.c mode CTRL/left-orrow 12 

Disploy music characters P 12 

Tum on music character display Q ,-....12 

Set volume Vn 13 

Select vote* Sn _ 13 

Choose octave On , 13 

Define) duration of note(s) Tn . . . .13 

Playrest|s) 18 14 

Play nole(s) p 

or ppppp - 14 

Play note following sharp # . . .14 

Play note following, flot & .. .14 

Read grophic mode RGR (=) .15 

Reod value in a color register RCOLR(w| ..15 

Reod color of a point on »he screen RDOT |x,y) 16 

Read value of osoundregtster RSND |u) - 16 

Reod value indicated by o games paddle RPOT(p) — 16 

Reod value indicated by a light pen RPEN (K) .. 16 

Reod value indicated by the joystick RJOY (z) 17 

The command KEY con only be entered in direct mode. The commands REGION ond DRAW ore 
only available in indirect mode. All other commands ore available in both direct ond indirect modes. 
Commands used to create graphics ond the SOUND command are executed in direct mode by 
pressing the RETURN key. The remaining music commands are executed as the key associated wrth 
thecommand 15 pressed, after entering single note music mode. The rood values must be preceded by 
the BASIC command PRINT m direct mode. In indirect (program) mode, single note music must be 
PRlNTed. 

Additional summary informahon on reverse of this page. 



igh Resolution Graphics Pa 
Commands include: Paint, Dn 
Circle, Colour, Point and many 
more. Includes additional 3K RAM 



Cs commodore 

v COMPUTER 



The information in in Is manual "as Been 

revie-wed and is believed to be entirely reliable 
No responsibility, however is assumed for 
inaccuracies, rne malarial in tfiis manual <a tor 
information purposes only, and is subject 10 
ctiange without notice- 
Si 982 COMMODORE INTERNATIONAL 
All rights reserved. No part of this program or 
accompanying instruction leaflet may be 
duplicated, copied, transmitted or reproduced In 
any lorm or by any means without the prior 
written permission of Cgmmgd«jre Hprn? 
Computer Division 

Commodore Business Machines Pty. Ltd. 
5 Onon Road, Lane Cove. N.3.W. 2066. 
Telephone: (02) 4Z/M888 

Printed >n Australia 

Q«aE#iiryp» CC;583 



SUPER EXPANDER USER GUIDE 

TABLE OF CONTENTS 



Section One — Introduction to the Super Expander Cartridge 



1 I Introduction 

1.2 The SUPER EXPAND£« Manual . 

1 .3 Loading ihc Cot i ndge 

1.4 Super Expander Commands 

1 .5 Entering Commands 

1.6 Conventions 

1.7 Compellability w.lh the Rule* of VlC BASIC 

1.8 Sloung und Running SUPFR EXPANDER Programs 

1.9 Termination a f SUPEfi EXPANDER Programs . 
I 10 Indication of E"0'5 - . 

Section Two — Using the Function Keys 

2.1 Introduction 



2.2 P'eossigncd Function . . . 4 

qmq Key Assignments i 



_. 6 

.. 6 

. ... 6 



2.3 Changing Key Assign 

2.4 Addinj}'Co<Mcg**R**n.- , n:'; 

Section Three — Plotting Graphics with Super Expander 

3.1 Introduction ... - - — . ■ 

32 Screen Coordinates ... 

3.3 Color Registers 

3.4 Graphics Command; » 

3.4 I GRAPHIC . 7 

3 4 2 COIOR ...... 7 

3.4.3 POINT 8 

3.4.4 REGION 8 

3.4.5 DRAW ....... 8 

3.4 6 CIRCLE ... 9 

3.4.7 PAINT .......................... . » 

34 8 CHAR ........ ' 

3.4.9 SCNCLS ,a 

3 5 Running the Exomple ... ""* 

Section Four — Making Musk with Super Expander 

4 1 Introduction .-11 

4.2 Sound Registers - -Jl 

4 3 Music Commands T 

4.3 1 SOUND Ploying Chords .. . -" 

4 3.2 CTRl/Teft-arrovr— Entering Music Mode ... .17 

433 P Displaying Musical Characters 12 

4.3.4 Q — Cancelling Musical Character Display 12 

4 3.5 V Sert.ng Volume .13 

4.3.4 S — Choosing a Music Voice 13 

4.3.7 O - Octave Selection ........ ] 3 

4.3.8 T — Choosirvg a Tempo .... '3 

4.3.9 C.D.E.F-.GA.B Music No'es u 

4.3 10 R — Playing Rests '4 

4.3.11 * Playing Sha-ps ....... u 

4.3.12 $— Playing Flals ■—" 

4.4 Summary ...... .14 



Section Five — Commands to Read Values 

5.1 Introduction 15 

5.2 RGR .. .,15 

5.3 RCOLR -IS 

5.4 RDOT . .14 

5.5 RSND ..„. ... 16 
5.4 RPOT .16 

5.7 RPEN 16 

5.8 RJOT . —17 

5.9 The Uk ol Read Functions . .17 

Section Six — Summary 

6.1 Introduction 13 

6.7 The Program Description 18 

6.3 The Program Listing 18 



TABLE OF FIGURES 



Figure 

3-1 Te«l Display 

5-1 Joystick Values 



Title 



.10 

.17 



SECTION ONE 

INTRODUCTION TO THE 
SUPER EXPANDER CARTRIDGE 



1.1 Introduction 

TheVlC1211ASUPeREXPAND€R CARTRIDGE 
is an interesting and versatile programming aid. 

It odds new colors, new sets of graphics and cm 
'enlarged mustc-wnhng potential to the 

rating system of your VIC 20 computer. It 
contains on extra 3K of memory (RAMI to 
enable you to write and RUN la rger programs, 
programmable function keys to speed program 
wnting and extra commands to ptor graphic 
shapes and painl colors on the screen The exl'a 
commands odded by SUPER EXPANDER w»ll 
extend riSe prog/amming power a* your VIC 
This manual H not designed to teach BASIC 

Erogrammi ng on the VIC. If you have only a 
-nited knowledge of BASIC programming, 

please refer to one of the following ; 
VIC 20 Use* Manual (supplied wi th your 
computer) 

An Introduction to BASIC Pom 1 and 2 by- 
Andrew Colin (port of the VIC learning senes). 

1.2 The SUPER EXPANDER 

Ma n u a I 

This manual is divided into si* ports as outli ned 

below-. 

SECTION ONE — INTRODUCTION TO THE 
SUPER EXPANDER 

CARTRIDGE 
Th* sechon discusses the SUPER EXPANDER 
in broad terms os well as explaining how to load 

the cartridge. It shows the range ot commands 

supplied by the cartridge, how these commands 
ore entered and what error messages will be 
displayed in the event of on incorrectly enter ed 

command. The cornpalability of SUPER 
EXPAN DER commands with VIC BASIC is 
defined. 

SECTION TWO — USING THE FUNCTION 
KEYS 
This section describes the commands that are 
automatically assfgned to the four (unction keys 
on the VIC keyboard and how the programmer 
may assign his own cpmmonds to these keys if 
he wishes. 



SECTION THREE PLOTTING GRAPHIC5 
WITH SUPER EXPANDER 

This sechon explains how the screen is divided 
for the purpose of graphics plotting! and how the 
values indicating the colors used to draw 
graphics shapes are recorded. The format or 
eocn command is stated, its pu rpose given its 
use is exploited and an example given •n the 
form ol a program entiry. The commands ore 
listed in the order that they might be used to wnte 
a BASIC program on the VIC such as the one 
contained in Section Sm of this manual. 
SECTION FOUR - MAKING MUSIC WITH 
SUPER EXPANDER 

This sechon describes the SUPER EXPANDER 
commands used to create musac on the VlC The 
format of each command is given, its purpose 
stated, its use explained and on example given 
in the form of a program enlry. The commands 
ore listed in the order that is required to create 
and ploy a SUPER EXPANDER musical phrase 
on the VIC 

SECTION EIVE- COMMANDS TO READ 
VALUES 

SUPER EXPANDER enables you to read ihe 
values in ihe registers used by the cartridge and 
the values returned by devices such as light 
pens, poddies, and joy sticks. The -commands to 
do (his are explained m this section 

SECTION SIX - SUMMARY 

This section describes o program that was 
WI itlcn using the additional SUPER EXPANDER 
commands. A full program listing is also 
included. 



1.3 Loading the Cartridge 

Always ensure that the power supply *s off 
be fore inserting or removi ng tfie SUPER 
EXPANDER CARTRIDGE. The cartridge a 
inserted in to the expansion port of your VIC with 
the bbel racing ^p.^See your VIC 20 User Guide.) 
If o VIC 1 1 Memory Expansion &oard is i n use, 
this also must be turned off. The SUPER 
EXPANDER cartridge may be used in conjunction 
wi th an BX. or 1 6K RAM pack. It may not be used 



with o 3K RAM pack as this already forms par) 

o* the SUPER EXPANDER carlndge. 

Tobegm us. ng SUPER EXPANDER. s.mply lu-n 
the power on^htlit the cartridge us in place 
Your VIC w.ll d.splay: 

« * « • CBW BASIC V3 • * « * 

6519 BYTES FREE 

READY 

All the SUPER EXPANDER commands, the 
new colors and the new graphics sets are now 
included m the operating system of your VIC 
You may use these commands at any time like 

any of her BASIC :ommand You may also wide 
longer program j using the ex*ra 3K of memory 
(RAM) lhaf is part of the cartridge 

The initialization of the cartridge automatic- 
ally assigns eight SUPER EXPANDER commands 
to me -four (unction keys on the right oF the VIC* 
keyboard., eg. DRAW, CIRCLE, PAINT These 
commands are displayed on the sceen when 

either me -function Key is pressed on its own, or 



the ^mnnm Ql ^^j <• ey is held down 
and a function key is pressed (See Section 2.2. | 
The programmer is also given me foci lity »o 
assign his own vol ues 1o fhese keys, ue_ different 

from those generated by *e cartridge. (See 
Section 2.3} 

1.4 SUPER EXPANDER 
Commands 

The following .s a list of SUPER EXPANDER 
commands which are odded to fha operating 
system of your VIC when the co rtr "'~ as 
inserted: 

Commands used >o create graphics: 
GRAPHIC, COLOR, REGION , POINT, DRAW, 
CIRCLE, PAINT, CHAR. SCNCLR 
Commands used to write music 
CTRL (left orrow), SOUND. 
P.Q,V,S.O,T,R,CD,E,F,G-A.B. #3 
Read Functions: 

RGR. RCOLR,RDOT,RSND,RPOT.RPEN ( RJOY 
Added »o the list above is ihe commond KEY 
wh>ch enables the programmer to assign his 
own values to Ihe function keys (See Section 23 i 

1 .5 Entering Commands 

All SUPER EXPANDER commands to create 

graphics may be used both in direct mode or as 
port of a program with the exception of Ihe 
commands REGION and DRAW. These cannot 
be entered directly, i.e. they must be part of a 
program. In d irecl mode, the commond is 
entered on Ihe screen without o line number and 
2 is executed when the RETURN key is pressed. 



Note mat in direel mode characters typed 
lollowing Ihe commands GRAPHIC! . GRAPHIC? 
and GRAPHO will not be displayed an the 
scree n. Extieme cere must therefore be taken to 

erwure thai any characters yw h/F* aher ,Kese 

commands ore typed correctly Failure to do so 
will couse any display that may ol ready Hove 
been on Ihe screen to disappear. The messoge 
"SYNTAX ERROR" will then bedisplayed on the 
VIC s normal screen. 

SUPER EXPANDER commands used to w Ac 
music car he used m both direct and indirect 

modes. In dii eo mode, Ihe command SOUND a 

typed m and then executed by pressing Ihe 
RETURN key The r ernatning music commends 
ore execu led in d*recl mode simply by pressing 
the key assigned lo the particular commond. 

AH SUPER EXPANDER (unctions e.cept KEY 
can b< used m your program iu*1 as you would 
use any other BASIC function. 

The cornmand KEY con be used in dtreei modp 

only It is typed >n and then executed by pressing 
the RETURN ke> 

1 .6 Conventions 

The forma' of eadi SUPER EXPANDER 
commond in fhic manual »s presented using the 
fallowing notation: 
I Hems written m capital Idlers should be typed 

exactly os shown. There is no need 'a use hSt 

SHIFT key to obtain capitals 

2. Those ilerns written m lower case letters 

indicate a user-specified entry such as a pa i > 

of screen coordinotes O' on octave numbei 

3. The round brackets m Ihe formal of each 
SUPER EXPANDER read fundian musl be 
typed in where shown . 

4_ Otfiersymools such OS comrnasond quotation 
marks must be typed exactly as shown 

5. The return key is indicated by (RETURN). 

6. VICdciesrK^recognisetheword'COLOUR' 
The poramelers used m Ihe 5oper Expander 

commands ore listed below 

Parameter Value 

n An integer nuimber 

sc Screen color 

bo Bonder color 

cho Character color 

au Auxiliary color 

c Colo* 

cr Color Register 

x,y Screen Coordinates 

rv Half the width of a circle or ellipse 

ry Half the height of a circle or ellipse 

OS Storting poml of an arc 

of Finishing ppi nt o' on ore 

v Volume of sound 



1.7 Compatability with the 
Rules of VIC BASIC 

The SUPER EXPANDER commands follow the 

same rules os VIC BASIC wlh one exception 
which is the BASIC code THEN If this code 
precedes a SUPER EXPANDER commond. a 

colon must be inserted oher the code, e.g. 
THEN:SCNCLR In all other respects, the SUPER 
EXPANDER commands are used m the same 
way as VIC BASIC commands. 

1.8 Storing and Running 
SUPER EXPANDER 
Programs 

A program written using the SUPER 
EXPANDER will not run unless the SUPER 

EXPANDER cartridge ts in place on your VIC 

The program may be saved on or loaded from 
diskette or cosseHe in the nonmol way 

1.9 Termination of SUPER 
EXPANDER Programs 

To holt a program usincj SUPER EXPANDER 
commands whilst the program is running, hold 
down me RUN/STOP key ora press the RESTORE 
key. In this way, you will rfitjci to the VlC & 
normol screen. 

1.10 Indication of Errors 

The message "SYNTAX ERROR' willoe 
displayed.fany SU PER EXPANDER command* 

incorrectly spell, You must then type Ihe correct 

spelling. This same error messoge will also bo 
displayed if any parameter i£ Omitted r'ornfl 
cpmmand r e.g CIRCLEwithnoheightspecified 



SECTION TWO 

USING THE FUNCTION KEYS 



2.1 Introduction 

The SUPER EXPANDER CARTRIDGE uses the 
four function keys O" Ihc VIC'S keyboard IO 
enable lost, eHioent program writing. Thereat e 
only four function keys but these give occess lo u 
tola! o' eight commands 

If you press the keys normally, 'he functions 
assigned to function keys Fl ,F3,F5 and F7 wi II 
be displayed on the screen Holding down eil Ikm 

ihc SHIFT or Up key and pressing these 
same keys will display (hose functions assigned 

to function keys F2,F4,F6 and F8. 

2.2 P reassigned Functions 

If you rype KEY and pr ess RETURN, the VIC 
will disptoy a list of eighi functions which are 
automat 1 calf y assigned to the function keys 

when the SU PER EXPANDER CARTRIDGE is 

initio died. These functions are listed below 
KEY 1, GRAPHIC 

KEY 2, "COLOR" 
KEY 3, "DRAW" 
KEY 4. "SOUND" 
KEY 5. 'CIRCLE" 
KEY 6. "POINT 
KEY 7, "PAINT" 
KEY8,"LiST' + CHRi{13; 

2.3 Changing Key Assignments 

FORMAT : KEY 

of: KEY n, "value" 
PURPOSE: To assign a new command to a 
function key 

KEY allows you to display the values ass igtved 

to the function keys or to assign your own value 
to orry function key, i.e. diffeient from that 

generated by the SUPER EXPANDER cam tdge. 
If you h/pe KEY and press RETURN, the VIC will 
display a list of eight functions which aie outo- 
mQticQlly osjigned la the function keys when Ihc 
cartridge is initialled. 

The va lue of o lunchon key con bechonged in 
two ways- The first o* these methods is used 
4 when the function keys have been displayed as 



above. To change an assignment ( move the 
cursor to the first position following the left hond 
set of quotation marts of the KEY number you 
wish to change Overwrite thee* rslimjcommana. 
delete any remaining characters assigned to 
trial key and press RETURN. SUPER EXPANDER! 
will enter the 'ight hand set of quotation marks 
automatically and Store the new assignment 

5UPER EXPANDER also includes o mote 

dnect method of changing Ihc value af a smgle 
key. Simply type KEY', the number or the key you 
wish io change, q comma, a sel of quotation 
marks and the value you wish to assign lo that 
key. When you press RETURN. hV second set of 
quotation morks will be added ond the new 
assignment will be recorded. 

One hundred and twenty-eight is the 
maximum number of characters that may be 
assigned to any one function key. You moy 
assign this number of characters to any or all o^ 
the function keys. 
EXAMPLE : To assign the BASIC code 

RESTORE to me F5 function key 

COMMAND: KEY I RETURN] 



DISPLAY 



ACTION 



TYPE 
RESULT 



KEY I ."GRAPHIC- 
KEY 2, "COLOR" 
KEY 3. DRAW 
KEY 4. "SOUND" 
KEY 5, "CIRCLE" 
KEY 6, POINT' 
KEY 7, "PAINT" 
KEY8. 'LIST"4CH(rSil3i 
: Move the cursor to the Firs) 
position following the left-hand 
set of quotation marks on the line 

displaying KEY 5. 
: RESTORE [RETURN1 
The BASIC code RESTORE is row 

assigned io the F5 key and will be 

d tsplayed on the screen each 
time the F5 key is pressed. 



2.4 Adding Carriage Returns 

To elt mmale the need to press RFTUR N 

following a function key command, you 1 may 
add o carnage return to the command in the 
following way; 

(o) Change the assignment (see Section 2.3) of 
the key where you wish to odd a carriage 

return, h/pe the end quote marks but do not 

press RETURN 
(b) Type -* CHRS (13| and press RETURN. 

Now, when you press this key. you will auto- 
matically generate a RETURN following *e 
command. 
EXAMPLE : To assign the BASIC code RUN 

ond a built-in cornauje return to 

the F7 functiom key. 
COMMAND: KEY 7, "RUN- • CHR$|I3) 

IRETURNI 
RESULT : You may now run n program 

S'mply by piess»ng the F7 key. 



SECTION THREE 

PLOTTING GRAPHICS WITH 
SUPER EXPANDER 



3.1 Introduction 

In Seciion Three, (he new commands supplied 
by the SUPER EXPANDER cartridge to create 
graphics are described. The commands enable 
you lo plot points, draw shapes, enter fejttond 
point on the screen in any one of Fifteen colors 
without having lo access locations in memory 
These commands ore entered | ust like any other 
BASIC command and may be used m direct and 
indirect made. The way the VIC holds the colors 
you hove selecied »n color regi Sters 15 olso 
explained. The commands are listed inihe order 
in which they mrghl be used to write a program 
such as the one m Section Six of this manual. 

3.2 Screen Coordinates 

For the purpose af plotting graphics the screen 
is divided into o 1024 by 1024 matrix. A maim <s 
Simply a grid in which a particular locaiion is 
addressed by referring to its coordinates. A 
coordinate is a number used to state the distance 
of a point on a grid from the origin or point. 
Two numbers are required, one indicating how 
far the point is away tram rhe origin in a 

horizontal direction and the other indicating 

how far the point is horn the origin m a vertical 
direction. The honzortal is colled rhe * axis and 
the verfical is called the y axis- The fi rsf coordinate 
staled in oil plotting commands is the x 

coordinate. In SUPER EXPANDER, rh.s s the 

position of a point on the screen >elat>ve lo iho 
leftedgeof the screen The second coordinate is 
the y coordinolc. This indicates haw far down 

from the top of the screen rhe poirrt is located. 
The origin or zero point of the screen grid m 
SUPER EXPANDER is the upper left comer of the 
screen. The coordmaiesof any point on the 
screen ore m the range to 1 073 

3.3 Color Registers 

When the VIC a turned on with the SUPER 
EXPANDER cartridge *n place, four color 
registers o*e assigned. |A register is simply a 
special memory location used to hold a value i 
A number in the range to 15 «s stored in each 
£ register and is used to indicate a cole The 



colors and their associated values are listed 
below; 

Black 

1 White 

2 Red 

3 Cyan 

4 Purple 

5 Green 

6 Blue 

7 Yellow 

8 Orange 

9 L-ght Orange 

10 PmU 

11 Light Cyan 

12 Light Purple 

13 Light Green 

14 Ught Blue 

15 Ught Yellow 

Register holds the value of *e color used as 
the screen background m a graphics display 
Register! containsthevalueofthecalorusedto 
form the beder surrounding the graph ics screen 
Register 2 holds the value of the character color, 
i.e. the color for plotting points, drawing 
graphic shapes or displaying text on a groph.es 
screen. 

Register 3 holds the value af the au«il iary coloi 
which also may be used to plot grnphic shapes. 
This register may only be accessed m multr-coloi 
mode or miicd mode. (See Section 3 J 

Initial color values arcplaced in these registers 
by executing the command COLOR. {See 
Section 3.4.2.) When the system «s turned on. the 
values m the registers a>e ' . 3, 6, and 
respectively. 

3.4 Graphics Commands 

All examples for commands used to create 
qrophics ate given in the following sections in 
the form of progr am entries. You may bui Id u p 
iKecogrom and RUN it after each new line is 
input- If you do so. before inputting ihfl 
you must hold down the RUN/STOP -ey and 
press the RESTORE key 



3.4.1 GRAPHIC 
FORMAT GRAPHIC n 

PURPOSE To select a gtoph.es set from the 
v*IC's operatTng system 
The commond GRAPHIC may be used in 
direct and indirect mode. There are four 
different GRAPHIC modes, each of which 

selects a set of graphics from the VICs 

operating system 

GRAPHIC is the VtCs normal mode Th.s 

command is used to return to a normal screen 

display from a graphics screen It is most 

commonly used Ot the end of a program 

containing, graphics. 

GRAPHIC 1 selects the multi-color graphics set 

from the VIC 'soperating system. In this mode, 

the VTC scales down the graphics plotting so that 

each position on the screen occupies on at^o 1 6 

dots w-de and 8 dots deep within the 1024 by 

1 024 dot sceen matrix (See Section 3.2 ) Points 

may be platted on the screen using any one of 
the four color registers available. (See 5ection 
33-1 All 1 5 SUPER EXPANDER colors may be 
used m this mode. 

GRAPHIC 2 activates the high- resolution color 
graphics set in the VIC'saperattng System Intlns 
mode, each position on the screen occupies an 
area 8 dots wide and 8 dots deep wilhin the 
screen matrix. Thus this mode displays points on 
the screen in aresoluliontwiceasfmeos mora* 
me GRAPHIC 1 cnrrwridnd. However, in this 
mode the colors in which points may be drawn 
an the screen are restricted to those contained <n 
registers Oand?, i e the screen or character 
colors. Only those colors numbered to 7 may 
be used in this mode. {See Section 3 -3.) If you 
specify a color value greater than 7 in the 
COLOR command. SUPER EXPANDER will 

subtract 8 from that value and use the color 

correspondi ng to the calculated value instead 
The character color may be changed using the 
command REGION i f you wish to use more than 
one color to plot points on the screen. (See 
Section 3.4.4.) 
GRAPHIC 3 activates eilher the mulli-coter ar 

high -resolution graphics set depending on the 
value contained in the character color register 
after the command COLOR has been executed 
(See Section 3 4.2.) I f the value of the color lies 
within the range to 7, al I platting will fake place 
mhigh-'r^lutto^nTode.lfrrWCotot number jg 
largerthan seven, allpotnfs will bedrawnon the 

screen in multicolor mode This command * 

useful if you wish to use high- resolution and 
multi-color graphics on the some screen 
EXAMPLE . To select the high-resolutton 
color graphics set- 



PROGRAM 

ENTRY ISO GRAPHIC 2 
RESULT : Thehigh-resoluhongraphicssel 

w i thm the VIC operating system is 

activated 
3.4.2 COLOR 

FORMAT i COLOR sc.bo.r.ha.au 
PURPOSE: To assign colors lo each of the four 

color registers. 
COLOR is used loselect colors for thi 

the border . the character and the auxiliary 
color. Thesc/een color, along v*ith setting the 
background color, may also be used lo erase 

points from the screen thot hove been plotted in 

o different color Ih« auxiliary color is used 
mostly with the commonb PAlMT (See Section 

3.47.) The volue of eoch color rs stored »n one af 

four color registers in VIC's memory Once the 
registers hove been set up with the COLOR 
command, the n umber of the color register 
forms the hrsf paramotei o* all SUPER 
EXPANDER commands used to plot graphics un 
me screen. CSee Section 3.3.) 

When the system H turned on, the four color 

registersconfoinlhe values 1,3. 6, and 

respectively. 

The color registers owOiloble fo< use m multi- 
Color and high -resolution modes arc M 
below 



mu/h-coJor 

screen co lor 

1 border color 

2 character cole 

3 auxiliary color 



■ 

screen color 

1 not available 

7 character cola 
3 not available 



As you can see from the list above, the only 
color tc-gisters available for use-m high- 
resolution mode are those containing the screen 

ond character colors. This limitation con be 

eased by changing the character color with the 
command REGION if you require a different 
charader color on the screen. (5ee 5ectio<- 3 - - 
EXAMPLE To select o white screen, a blue 

border, a black char Oder color 
and a pink auxiliary color 
PROGRAM 

ENTRY: 1 10 COLOR 1,6.0,10 
RESULT i When this program line m 

executed, a white screen 
surrounded by a blue border rs 
disproved. All graphics plotted 
using the color register containing 
the character color will be in 
black If the auxiliary color is 
used, the plotting will be in pint. 7 



3.4.3 POINT 

FORMAT POINT CM.y 

Of. POINT cr,x,y,xl.yl .. »n,yn 

PU RPOSE: To plot o pomr O' points on the 
screen m a specified color, 
l-i mulii-colormode, a pom! may b« p'oHed on 
the screen m any of ihe colors available m the 
(our color registers. (See Sechon 3.3.) In high- 
les-Qlul (On mode, points may be plotted only with 
thosecolorsovailable inlhe screen or character 

color registers. (SeoSecliort3.4_ljThecornrtiond 

may be used to plot one c o number of points cw i 
•he screen. If only one set of screen coordinates 
15 specified in Ihe commond, then only one pom i 
wil I be plotted. Alternatively, you moy specify a 
number* of sets ot screen coordinates which wi II 
result m ihct number of points being, plotted on 
the screen. You may, however, only plot in one 
cole in o single command. 
EXAMPLE To plo' Single point on the 

screen m the color block: 

PROGRAM 

ENTRY 120 POINT2.900,9{» 
RESULT . When rhis line is executed, a 

Single block point will be displayed 

in ihe bottom nght-hond comer 

of the screen. 
EXAMPLE : To plot tour points on ihe screen 

inlhesame DC 
PROGRAM 

cNTRY: 130 POINT? 900.100,900.300. 

1000, 100 ,1 000.380 
RESULT When this line is executed, four 

block points will be plotted m the 

top ngnl-hand corner of the VIC s 

screen. 

3.4.4 REGION 

FORMAT REGION c 

PURPOSE To change the charade color 

REGION changes the rhoroeter color which 
you previously specified m the command 
COLOR, i e. H changes the value stored in color 

register two (See Section 3.4.2.] Any one of the 

1 5 SUPER EXPANDER colors may be used as the 
parameter of ihtS command in multi-color 
mode. In high -resolution mode only color? 
numbered to 7 may be used This command is 
especially valuable if you are in high resolution 
mode and wish to create display? other thgn m 
the screen or character colors. (See Section 
145.) 
EXAMPLE Ta change the chatoclct color ro 

red: 
PROGRAM 
8 ENTRY 140 REGION? 



RESULT When this program lino S 

eiecuted. the color value fa' t ed 
is stored m register two. Follow- 
ing the command, all points 
drawn on the screen wh-ch use the 
character color will be drawn in 
i «l This wi II Continue until Ihe 
charade' color* rs changed with 
another REGION command. 



3.4.5 DRAW 

FORMAT DRAWcr,x,yTO«l,y» 
or :DRAWcr,»,yTOxl,yl TO *2.y2 

or DRAW Cr, TO *.y 

PURPOSE: Toplotashoightlinebehveenhvo 
points, on the screen. 
DRAW will plot a strcngthl line in the color 
indicated in the color register specified. (See 
Section 3.4.2. [ The DRAW command nioy be 
used i n three ways.- 

1. Yoo may DRAW one line between hvo points 
on the screen specifying only one set of 
coordinates- Then,, if you wish.you may use 
the command again 10 DRAW another line 
between different points on the screen. 

2. You may DRAW many lines with one DRAW 
command by specifying many sets of 
coordinates separated by the code TO. The 
first set of coordinates indicates the starring 
po.nl of the f.rsl line to be drown an the 
screen The termination pom! of each I me 
becomes the storing pom* of the next line. 

3. You may also DRAW specifying only the 
termination point of a line. In this cose, the 
starting point of the line will be the 
termination pom) of the last grophic shape, 
drele or pom! . 

MOTE. In me (after case, H no previous shape 
hos been drawn on the screen, the starring point 
oi the line wifl be screen location 0,0, i.e. the 'op 
left-hand corner of the screen 

EXAMPLE : To draw a <ectonale: 
PROGRAM 

ENTRY 1MDRAW2. 106. 100TO 203. 
1 00 TO 200, 200 TO 1 00, 200 TO 
100,100 
RESULT A sma II red rectangle will be 

drawn in the top leH come* of the 
screen when this program line is 

—toted, 

EXAMPLE : To draw a diagonal line to the 
centre of the screen. 

PROGRAM 

ENTRY I60ORAW2TO512, S1J 






RESULT A line will bo dtawn from the 

point where VIC f i nished drawing 
the rectangle to the m iddle of the 
screen. 



3.4.6 CIRCLE 

FORMAT CIRCLE cr^.y.rvry 
or CIRCLE cr.i.y.rx^ry.os.af 

PURPOSE: To draw a circular shape on ihe 
screen. 
The Coordinates defined in the commond 
CIRCLE specify the screen location of the centre 
o( a circle or circular shape. The ne«t set of 

parameters give the width and heigh! of that 

shape from i ts centre. Ttus last set ot coordinates 
enables you to draw flattened or cles. i.e. ellipses. 
Because of the way points ore plotted on Ihe 
screen, in order Co draw o precise circle, m does 
not equal ry as you would expect. You must 

multiply the a parameter by 07 to allow for the 
fact Ihot the screen is rectangular although the k 
and y ay.es each have the same number of 
divisions. 

To draw an arc of a circle you must add o 
further set of parameters to the command 
QRCLE. The first parameter is the starting pomi 
of the arc on the circumference of the circle and 
the second parametsr is »he finishing pomiof 'he 
arc The unit used in these paiameters a a 
IJ grodiOn" There are lDfigradiansino 
complete circle. The position of Qfodian is at 
the 3 o'clock position onoclock face. Grod-ans 
increment in a clock-wise direction around the 
Circumference of the circle Finishing ol gradian 
1 00, ogom ot the 3 o'clock position. 
EXAMPLE To draw a circle: 

PROGRAM 

ENTRY: 165CIRCLE2.512..512.70.10O 
RESULT . When this program line .s 

ex ecuied, o red circle will be 
drown in the middle of the VIC's 
screen. 

EXAMPLE : Tadrawtwoarcsofocircle- 
PROGRAM 

ENTRY: 170 CIRCLE 2, 800, 300, 140. TOO. 
40.60 
180 CIRCLE 2, 800. 300 J 40. 1 00 
90,10 
RESULT ■ When these lines are eneeuled, a 

set of round brockets will be 
drown in red on the VIC s screen. 



3.4,7 PAINT 

FORMAT PAINT cr,x,y 

PURPOSE To fill an enclosed area with color. 

PAINT Blh in a whole area w.th the color 
indicoted m the color register defined The area 

must be completely enclosed or pointing will 
take place over ihe whole screen. The or ea to be 
pointed is specified by the coordinates of ANY 

pom! v.ithin its boundaries. 

Each area may only be pointed once. If you 
are using the GRAPHIC 3 irtstruction set (see 
Section 3.4. 1 ). an area which is bounded by 
drawing in multi-color mode must be painted in 
ihe some mode, i.e. you connot chonge modes 
between creating the shape and painting it. 
EXAMPLE To draw a red circle ond paint ( » 

in yellow: 
PROGRAM 

ENTRY. 190 CIRCLE 2,300.800,70,1 00 
1 95 REGION 7 
200 PAINT 2, 300.800 
RESULT : When this section of ihe program 

is eiecuted, o small circle wil I be 
drawn in red in the bottom left- 
hand camerof the screen ond the 
oreo mside ihe ci rele will be 
painted in yellow. 



3.4.8 CHAR— TEXT DISPLAY 

FORMAT CHAR row, column, tod 
PURPOSE- Todisplaynormalteartonagraphics 
screen. 
CHAR will display normal led on a graphics 
screen beginning ol the row and column 
defi ned . This command con be used m the 
GRAPH IC 2 high -resolution mode and in ihe 

GRAPH IC 3 mixed mode when the value of the 

color contained in the character color regrsteris 
less than 8 (5ee Section 3.4.1 ) This command is 

not available in GRAPHIC 1 multi-color mode. 

EXAMPLE To deploy the word "ART" in 

blad* on ihe graphics screen ; 

PROGRAM 

ENTRY. 210 REGION 

220 CHAR 5.I4."ART" 

RESULT : When this section of Ihe program 

is executed, the word "ART" will 
appear in block between ihe 
previously displayed set of 
brackets. (See Figure 3-1 .] 




SECTION FOUR 

MAKING MUSIC WITH 
SUPER EXPANDER 



F<guie 3 ■ I Text Display 



3.4.9 SCNCLR 

FORMAT : SCNCLR 

PURPOSE: To clear a graphics screen 
SCNCLR is used in graphics mode io dear the 

screen i n the same woy lhar Ihc BASIC statement 

PRINT "ISHIFT^CLR/HOMEI" B used. Thit 

command can be used In bolh direct and 

indired modes. 

EXAMPlE : Toclearthegraphicsscieenin 
the program listed above. 

PROGRAM 

ENTRY 240 5CNCIR 

RESULT When this line a executed, the 

SC-een will be blank, i.e. a white 
so sen with a blue bode/ 

3.5 Running the Example 

To RUN the above as a complete p*og'om, 
odd a delay loop before the screen clea rand on 
end Io >he program as Follows: 
PROGRAM 

ENTRY: 230 FOR X = 1 TO250GNEXT X 
250GRAPH1C0.END 
When you 'un this program you will see an 
(.•■ample of some of the simple gruohics 
copabil ities of SUPER EXPAND ER 



4.1 Introduction 

This section includes all the steps 'equired to 
make music or norseontbe VIC w-th SUPER 
EXPANDER, Both music and no.se can be 
played in direct or indirect mode. You may play 
a Series of notes at the same ti me. i.e. a musical 
chord.orplayosrrmgofstnglenofesarsotjnds. 
Within a program, a music phrase using single 
nates if. a eated by entering fh* SUPER 
EXPANDER m usic characters ins«de a BASIC 
PRINT statement and "punling" thermis>c 
Music can also be created in direct mode 
wi thout the use of o PRINT sf atemen) simply by 
pressing the VlC's keys after enlenng music 
mode. To create o chord, 'he command 
SOUND is used in eitherdircc»o' indirect mode. 
SOUND is also used to generate notse 
NOTE. ThepfKh of notes c no.-se may d-n/er 

s'lghtly between Afferent VFCs. 



4.2 Sound Registers 

When the VIC is lurned on with the SUPER 
EXPANDER cartridge installed, five sound 
registers ore assigned. A register is o special 
location in memory which holds a value. The 
values in the five sound registers ore ploced 
there after the execution oF the command 
SOUND. (5m Section 4 3.1.. 

The registersorenumbered 1 to 5. Registers 1 
to 4 are linked to the four voices of the VIC whilst 
register 5 is concerned with the intensity at the 
sound. A value m ihe range 128 to 255 placed >n 
one of the first four registers will cause a sound 
to be played in the associated voice, tf the value 
is less than 1 28, no sound will be played through 

the vo ice. 

Registers 1 lo3 wt(l generate musical noteS- 
iFora complete list of mus>cnoies and their 
associated numeric values, see Appendix F of 
your VIC 20 Computer User Guide.) Each 
musical sound register, i.e. one, two and three. 

has mree complete ociaves in its range. You can 

thinkof 'he first three music registers as voices" 
much like 'he parts m singing, i.e. bass, treble 
and atto. Each register is one octave higher than 



its predecessor, i e o note ptayed m octave 3 of 
sound voice 1 has the same pilch as the identical 
note ployed in octave 2 of sound voice 2 and 
octave 1 of sound voice 3. 

Register 4 is used to create "white noise" for 
special sound effects. 

Register 5 contains the value of the volume- 
level of music and/or noise. This value can be 
between Q (ofT| to 15 (loudest) (Note rharin 
single note music mode. ■ .e. wm me command 
V, you are limited fo a maximum value of 9 ) 

4.3 Musk Commands 

In thjs section, the format of each SUPER 
EXPANDER music command is shown, its 
purpose given, its use described and an 
example given. All commands can be entered in 
director indirect mode. The command SOUND, 
which can create a musical "chord", is shown as 
a direct mode enSry. An example oF all othei 
music commands is given m the form of a 

program entry. Eoch of these commands ts 

entered on one program line. In this way, a 
music phrase is built step-by-slep unti I the tune is 
Complete and ready -to ploy, The new entry on 
Ihe line is indicated in bold type. 

4.3.1 SOUND -PLAYING CHORDS 

RDRMAT : SOUND si , s2. s3. s4, s5 
PURPOSE: To create multi-voice soimd effects. 
The command SOUND enables music chords 
to be played on the VIC. The paramererssl to s3 

define the values of musi col notes each in the 

range 178 'o 255 which are to be played mote 
of the three V IC musical voices. A value less than 
1 28 for any one af these parameters wilt ploy no 
sound from the ossocioted voice. (See Appendix 

F of your VIC User Guide.) The parameter s4 
defir»es the value of a "white noise" used to 
create special sound effects. It can contain o 

noise value wrilhin the same range, i.e. 178 to 

255, and may be switched off in the same way as 
voices' to3. The parameter s5 defines 'he value 
of volume level set ranging from (off) to 15 
(loudest) , The SOUND command is cancelled 
by assigning the voluefl to all the vO-Ce* 0-* by 
assigning the value to parameter s5. 



EXAMPLE ; To play a scries of linked chords; 
PROGRAM 

ENTRY: 300 FOR X ■ 1 TO 50; SOUND 
225.225,225.0,? 
310 NEXT X 
320PORX = I TO 50 SOUND 

23O,23fl.23e,0,9 
330 NEXT X 
340 FOR X = 1 TO 50 SOUND 

235,235535,0.9 
350 NEXT X 
369SOUND0,0.0,0,8 
RESULT . A three chord triplet will be 

ployed when this section of the 
progtam is executed. 



4.3.2 nmS ^m -ENTERING 
MUSIC MODE 

FORMAT ; CTRL left arrow 
PURPOSE: To enler ffte SUPER EXPANDER 
music mode. 
CTRL left arrow can be used: in both direct and 

indirect modes to ena ble you to moke SUPER 

EXPANDER music on the VIC The commond is 
executed by holding down the CTRL key and 
pressing the left-arrow koy. Tou may use the 
command inside quotation marks to p 
series of musical notes and ploy Ihe tunc that has 
been com posed 

When you enter this command inside a PRINT 

statement, a reverse-field F will be displayed In 

di reel mode, you may use this command outside 
quotation marks No symbol will be displayed 

on the- screen. You may ihtn use the keys at the 

VIClO play single note music just I ike any 
keyboard instrument. To terminate the music 
mode, press the RETURN key. 

When the CTRL left-arrow command has 

been eureeuted, the SUPER EXPAN DER music 

pockoge interprets only those characters thai 
form the music character set. They are 



P.G,V.S,0,T.R.C,D£c.GAB. _ s 

Al I other VIC Keyboor d characters ore ignored 
by the SUPER EXPANDER cartridge. 

Wrthm your program, you may enler up ta 77 
of Ihese characters in any one PRINT statement 
between the CTRL left arrow symbol and the last 
set of quotation marks.. By reducing thrs figure lo 
71 ana adding a semi -colon following the last 
set of quotation marks, the nert string af musical 

notes will be played immediately following the 

previous string of notes. To stop a rune while it is 
playing, simply hold down the RUN/STOP key 

and press rhe RESTORE key. 

' 2 EXAMPLE . To write music in program mode; 



PROGRAM 

ENTRY 370PKINT"(CTRLyleft- 
arrow)" 

RESULT • A reverse-field F will be 

displayed. Any key you type 
between Hits character and me 
lost set of quotation marks, until 
RETURN is pressed, will be 
interpreted by the SUPER 
EXPANDER music pockoge when 
the program >s run. 

EXAMPLE : To begm making music in direct 
mode. 

A CTION Hold down the CTRL key and 

press Ihe left cow key. 

RESULT ; NockirarJCTwillbedrsployed 

on the screen but all m usic 
choracter fceys will be inter- 
preted by the SUPER EXPANDER 
music package. Any key pressed 

ihot represent* o music note, e.g. 

CD or E will result in that note 
be<ng played 

4.3.3 P- DISPLAYING MUSICAL 
CHARACTERS 

FORMAT P 

PURPOSE I To display all music choroclers on 
ihe screen. 
The command P can be used m direct and 
indirect mode. II is used to display the characters 
Ihot you have used ta create a piece of music as 
that music »s bemg played. This commond is 
especially useful asa composing aid. Il will help 
you to see where any wrong notes appear m 
your music composiwon. You may then correct 
these notes with me VIC's normal edi ling 
facilities The command Q is used to halt music 
character display. (See Section- £4 
EXAMPLE : To display music characters tn 

program mode. 
PROGRAM 

ENTRY: 370 PRINT" (CTRU left -arrow] P" 
RESULT : When this line -s executed, oil 

music characters following the P 

on the line will be displayed on 

the screen. 

4.3.4 Q- CANCELLING MUSICAL 
CHARACTER D ISPLAT 

FORMAT Q 

PURPOSE: To cancel the display of musical 
characters. 

The command Q con be used both in direct 

and indirect mode. The command will halt the 
display a f characters during music rnode. 

EXAMPLE : To ploy music choroclers in direct 

mode with no screen display. 



ACTION : Hold down the CTRL key and 

pfess the left-arrow key to enter 
the music mode Type Pond press 

keys C and D 

RESU LT : Two notes ore played and the 

characters C and D> are displayed 

on ihe screen 
ACTION Type Q and press the C and D 

keys again 
RESU LT The same two rtotes are played 

but no characters ore displayed 
on the screen 

4.3.5 V- SETTING VOLUMf 

FORMAT . V n 

PURPOSE. To set the mus»c volume. 
The command V sets the volume which will be 

used to play single notes of SUPER EXPANDER 

muSiC, '.e. il *5 n Qt used in conjunction with the 

command SOUND. This volume volu>e can 

range from (off) to 9 SloudeSll. 

EXAMPLE Toselavolumeof9pnortomtfS«c 
writing in program mode: 

PROGRAM 

ENfRY: 370 PRINT "[CTRL/ieft-anow] 
PV9 

RESULT When the l.ne .s executed, oil 

music between Ihe command and 
the second set o' quotation mo rks 
wi II be played with the volume set 

al 'he highest leve I. Thrs level of 

volume wi II continue until the 
commond is used ogam lo set a 
quieter volume. 

4.3.6 S- CHOOSING A MUSIC VOICE 

FORMAT Sn 

PURPOSE. To seled a mus.c voice 

The commond S is used to select one af the 
four sound voices available in VIC music made. 
Tne voice chosen determines the "pitch" of Ihe 
note Or how high the note wi II be ployed. Each 
voice has three octaves in its range. (See Section 
43.7.] A/i octave is a group of e< ght notes The 
voices o»e numbered l to4. Voices 1 to3are 
used to compose musk with SUPER EXPANDER. 

These voices ore analogous with Boss, Treble 

and Alio singing voices respectively. Voice 4 is 
used for creating "white noise" sound effects. 

EXAMPLE . To seted sound voice 1 
PROGRAM 

ENTRY. 370 PRINT ''(CTRL/left-arrow) 
-S2 
RESULT . All subsequent music will be 

played using the second soor»d 
voice until the command is 
changed 



4.3.7 O- OCTAVE SELECTION 

FORMAT On 

PURPOSE; To select a music octave. 

The commond Q (the letter 03 in Oscat not 
the number 0) is used to select a group of eight 
notes frewn which you wish to play a note. Each 

musical sound register, i.e one, two and three, 
has three complete octaves i n its range. Each 
sound voice begins one octave higher than its 

predecessor, i.e. a note played m octave 3 of 

sound voice 1 has the some pilch os the identical 
note prayed in octave 2 of sound voice 2 and 
octave 1 of sound vo ice 3. When ploy ing notes m 
different sound voices, always ensure thai the 
octaves are chosen correctly, i ,e. lo si ng m close 
harmony, ports or unison. 
EXAMPLE . Toselectoctove3mthepreceding 

program line. 
PROGRAM 

ENTRY- 370 PRINT" (CTRL/ left-arrow) 
PV9SI03 
RESULT : When this, line is eiecuted, all 

notes between the 3 a nd the 
second sel of quotation marks 
will be played in the third octave 
at ihe second sound voice. 

4.3.8 T-CHOOSINGATEMPO 

FORMAT Tn 

PUR POSE' To setecl ihe duration of a note. 

The COmmond T selects the du ration or tempo 
of a note according to the values m the following 

chart: 



TEMPO 


BEATS/ 


DURATION 


No. 


MINUTE 


{• 1/49 sec) 


e 


900 


4 


1 


m 





2 


450 


8 


3 


300 


12 


4 


22S 


16 


5 


150 


24 


6 


112.5 


32 


7 


54.25 


44 


a 


28 


178 


9 


14 


255 


EXAMPLE 


To selecta tempo of 1 12 5beots/ 




minute in 


ihe preceding program 




line. 





PROGRAM 

ENTRY; 370 PRINT'tCTRL/left-airow| 
PV9S203T6" 
RESULT . The note's) between T6 ono me 
second set ot quo'oiion marks 
will be played for a duration of 
32 oOthsolo second. 13 



4.3.9 C,D,E,F.GAB- MUSIC NOTES 

FORMAT lend 

where tetter Is any one o> combina- 

tion of the choroders CDEFGAB 

PURP05E: To play a musical no'elsl 

The keys C,D,E.F.G,Aand Bore used io ploy 
notes in either direct or indeed mode. Indirect 
mode, the note is ployed aa the Vey is pressed. In 
indirect mode, the totes a»e enclosed in 
quotation morlts as pari of o PRINT statement 
There is na need to place sepaiahng characters 
between musical notation in either mode The 
SUPER EXPANDER mubC package will ignore 
any non-music character. 
EXAMPLE . la play a melody m the p. 
prograrn line 

PROGRAM 

ENTRY; 370 PRINT :CT*L iutt-a"Ow| 
PV9S2O3T4C0E 
RESULT : When this li ne is executed, three 

notes w-ill be played and he 
musical charoclers will be 

displayed on the sera 

4.3.10 R- PLAYING RESTS 

FORMAT R 

PURPOSE. To ploy on.ustcal rest. 
R is used io create silenT periods m a musical 

composition. The length or the period, or rest, is 
determined by the command T. (See Section 
43.8.] 

EXAMPLE To insert rests in the preceding 

program line: 
PROGRAM 

ENTRY: 370 PRINT' (CTRL/telt-arrow) 
PV9S203T6CRDIcE 
RESULT . When this line u no- u. 

the notes w ill be separated by 
resl beats. 

4.3.1 1 a - PLAYING SHARPS 
FORMAT « 

PURPOSE: To indicate that the lol lowing note .5 
sharp 
The command # is used in music mode to 
instruct the SUPER EXPANDER music package Io 
play the next note sha rp. Only the note 
immediately following the » is affected 

EXAMPLE i To play the notes C and C f* in 

direct mode 
ACTION TypePRINT"(CTRL/leh-arro»l 

PV°S203T6« * C" (RETURN I 
RESULT : Two notes will be ployed, the 

second a semi-tone higher than 

the fitM 



4.3.12 J- PLAYING FIATS 
FORMAT S 

PURPOSE To play the next note Bat. 

The command S is used in the music mode to 
instruct the music package to ploy the following 
note flat. Only the nole following the command 
will be ahfected 

EXAMPLE :Toplujthenote5BondBJin 

direct mode: 
ACTION TypePRINr'ICTRL'leh-orrow: 

PV9S203T6BRSB ;RETURN| 

RESUlf Two notes will bt 

second o semi-tone lower than 
'he dm. 

4.4 Summary 

Putting Together oil the rnusiccammonds listed 
above, you con ptay a simple tune such as the 
one below. 
PROGRAM 

ENTRY. 3/0PRINI (CTRL-'l»n 

PV9S703I6CDIT4CRT 
6CDiT«RT6EFT7GT 
4RT6EFT7G 



SECTION FIVE 

COMMANDS TO READ VALUES 









5.1 Introduction 

This section illustrates l*w seven read 
hjftct.ons that ore port of the SUPER fXPANDER 
command set . These functions CO 1 DC used in 
dir eel and indirect mode. In direct mode, the 
function must be preceded by the BASIC code 
PRINT and the RETURN key pressed following 
Ihefurictranto deploy the value -end The functions 
enable you to determine values created by 
certain SUPER EXPANDER commands or by 
games control devices. For example, uS<ng one 
1 these functions , you con read the values ol t he 
color rcg liters yOu Set up- with the Command 
COI OR or th* sour*J registers you set up with 
the command SOUND. I f >ou incorporate the 
use of gomes paddles, the joystick or |he light 
pen in your program, you can use o funct -an io 
determine the value indicated by o games 
device ol a momenl in lime. The Io* mot of each 
function is shown, its purpose given, its use 
explained and an example shown. 
NOTE- in the formats fisted below. flwc brae-eft 
must be inc/udeo* m the command statement 

5.2 RGR 

FORMAT RGR (n| 

PURPOSE' To f cod the graphics mode that was 
set wHh (he commend GRAPHIC 
This func^on ngods the number of the graphics 
mode that was set with the command GRAPHIC 
|See Section; 3.4. 1 lAnynumberinmerangeBlo 
255 can be used as the parameter of thus function 
Whilst a porameter must be slated, its va luc 

does not affect Iho value returned by the 

function. This function is useful »n program mode 
when you wish to change horn one graphics 
mode to another ond then return to the original 
graphics mode. This (unction <.s not valuable in 
direct mode because 1 1 ahvays retumsavafueoffl. 

EXAMPLE : To draw three circles, changing 

color and graphics made before 
each 
PROGRAM 

ENTRY. 10GRAPHIC2 

20 COLOR 1,6,0.10 



30 CIRCLE 2^12^1 2.70. 100 

40 X = RGR (B) 

50 GRAPHIC 3 

60 REGION 10 

70 CIRCLE 3.850,750,70, 1 03 

80 GRAPHIC X 

90 R£GION 

100 CIRCLE 2.300,806,70, 103 
110FORZ»1TO1K»:NEXT 
GRAPHIC 
RESULT When the obove program is 

RUN, the number of lh* firSt 
graphics mode <s assigned to the 
vanable X and that va- >ob'e <s 

used *o sei up the third graphics 

mode. 

5.3 RCOLR 

FORMAT RCOLR (cr) 

PURPOSE : To read me color conlairw-d m a 
color register 
This function will read (he value of the coloi 

contained in the color registers which you 
assigned by the command COLOR or changed 
with (he command REGION. The function is 
especially usehj I in high-'esolution mode when 
you wish to plot a point an the screen with a 
color other than the screen and character color 
ond do not wish to use the commond REGION. 
EXAMPLE . To drow a circle in high- 
resolution using the character 
color and paint it >n the auxiliary 
color : 
PROGRAM 

ENTRY. 10 GRAPHIC 2 

20 COLOR 1.6.0,2 
30 CIRCLE 2,5 1 2,5 12, 70, 1 00 
40 Q = RCOLR 0) 
50 REGION Q 
60 PAINT 2. 51 2.51 2 
RESULT : When the above program rs RUN. 

fie color contained m color 
register 3 will be read and that 
coto* will be used to Dai nt the ore le 

15 



5.4 ROOT 

FORMAT ;R DOT (x.y) 

PURPOSE To obtain ihe color value of o dot on 
the screen. 
The BOOT function w.l I read the color value 
of a doi located al iKe position in the screen 
matrix given in the function parameters. (See 
Section 1 .4.1 This function is most useful in multi- 
color mode when you wish to plot points ordraw 
graphics shapes on the screen w.ih o paint cot or. 
EXAMPLE : To draw and paint a o rde m 

multi-color mode and draw a 
second circle with the color used 
when pointing. 

PROGRAM 

ENTRV: 10 GRAPHIC I 

20 COLOR. 1.6.0,10 
30 CIRCLE 2,512.5 12,70,100 
40 PAINT 34 1251 2 
50 X* RDOT(512,51? f 
60 REGION X: CIRCLE 2.750, 
750.70,100 

RESU LT : When this program is RUN, a 

black Circle pa inted m pink and a 
pink circle will be displayed on 

the screen. 

5.5 RSND 

FORMAT :RSND(n| 

PURPOSE Toreodthevaiueofosoundregisfer. 
The function RSND reads the value of a notem 
the firs! four sound registers set up by SUPER 
EXPANDER and Ihe volue o( the volume set in 
the fifth sound register. (See Section 42 } This 
fundton can only be used to determine the 

contents of the sound registers following Fho 
command SOUND (See Section 4.3.4. ) 
EXAMPLE To use the RSND function within a 

program: 
ACTION : Type in the fallowing short 

program and RUN it 

PROGRAM 

ENTRY: 18 X = 225 : SOUND X.XA0.9 
20Y=RSND(5) 
30FQRZ = YTQ05TEP 1 
40 SOUND X.XJU3.Z 
50 FORC = 1TO500. NEXTC^ 
60FORZ = BTOV 
70 SOUND XJ<,X,0,Z 
80 FOR C = 1 TO 500 NEXT C i 
90 SOUND XJOU3.0 

RESU IT : A musical chord will be played. 

first fol ling and then rising m 
volume 



5.6 RPOT 

FORMAT . RPOT (nj 

PURPOSE: To reod the value of o paddle 

The function RPOT will reod the value o» a 
DCtddle and return a -figure in the range lo 255 
This represents the position of the paddle 
relative fa the leh edge of the screen The va lue 
of n is to reod one paddle and 1 lo read the 
other 
EXAMPLE To read the value of a poddle in 

direct mode; 
ACTION . COTnectapoddlesejtothegarne 

port on your VIC (Sea your VIC 
20 User Guide and accompanying 
literature. ) Turn Ihe paddle 
control m a clockwise direction 
until you reach me furthest 
position. 

TY PE : PRINT RPOT (0) [RETURN! 

DISPLAY 

ACTION : Turn the poddle control as far as 
it can ao in the opposite direction 

TYPE : PRINT RPOT (0) (RETURN) 

DISPLAY . 255 

5.7 RPEN 

FORMAT :RPENm> 

PURPOSE: To read the value of the light pen 
The fy ncticjn RPEN wj| I reod the position on 
the screen ar which rhe light pen rs pointing. If 
n « the position re lotive to the left edge of the 
screen will be reod {the X value) and if n = 1 me 
position af the pen in relation to the top or the 

screen will be reod ( the Y value) . A value m the 

range to 255 will be returned in borh cases. 
NO IE: U fhe values returnecf by *h,s function to" 

outside this range, y-our fight pen wilJ need to be 

calibrated. To do this, refer to me insfrucnons 
suppiied with your pen. 

EXAMPLE : To reod the poini on the screen at 

which ihe light pen is pointing - 
ACTION : Connect a light pen to the games 

port on yOU' VIC 

Type in the following program 

and RUN it: 
PROGRAM 

ENTRY: 10 X = RPEN(0):Y * RPEN(l): 
PRINT X.Y:GOTO 10 
ACTION . Point ihe I ight pen at different 

positions on the screen. 
RESULT ! A series of pairs of numbers will 

scroll up the screen. The number 

on the left .s fhe X value and the 

number on the right is theYva'ue. 



5.8 RJOY 

FORMAT RJOY(n) 

PURPOSE T reod Ihe value of 'he iaysr.ck 

The Function ftJOY determines the va lue wine h 
indicates u iovstick movement You n>ayuseony 
number between and 255 as the parameter of 
this function. Whilst a parameter muH be stated . 
its value does notched the value returned by the 
function 

The values generated by the joystick when it 15 

moved >n each direction and when ihe fire- 
button is pressed is given on the chart below. A 
diagram showing these values is Fflur c 5- ] . 



DIRECTION 


VALUE 


UP 


1 


DOWN 


1 


BIGHT 


8 


LEFT 


i 


RIGHT DIAGONAL UP 


9 


LEFT DIAGONAL UP 


5 


RIGHT DIAGONAL DOWN 


ie 


LEFT DIAGONAL DOWN 


6 


FIRE BUTTON 


128 


NO MOVEMENT 


I 


FIRE BUTTON 





1 C s COMMODOfcC ^ 




Figure 5- 1 Joystick Values 

EXAMPLE : To r eturn oil possible values of 

the joyshclc 
ACTION Insert the joystick into the gomes 

port on your VIC. (See your VVC 

User Guide. | 



Type m ond then RUN Ihe 

following short program. 
PROGRAM 

ENTRY 10 X = RJOY (B|: PRINT X 

2OFORS = ITO1800:NEXT 

3D GOTO 10 
ACTION : Move the joystick around ortd 

press the nre-botton wnitstthe 

program is running 
RESULT The vol ues of all the (oystick 

positions ond af the fir e-bution 

are displayed on the screen 

5-9 The Use of Read Functions 

The functions which 'cod the values of games 
devices hove an obvious use. "When you wnte 
games, you will need to know the position that 

Ihe player has indicated . RPOT, RJ OY ond RPE N 

enable you to do this with ease. 

The chief value of the orher commands is as a 
debugging or diagnostic tool. If your program is 
not running correctly, you may, for example, 
reod Ihe values of ihe color or sound registersa' 
a particular point and see <f the values returned 
are what you expected. 



SECTION SIX 

SUMMARY 



6.1 Introduction 

This section contains o program that was 
written using the SUPE R EXPANDER cartnage. 
The program is described and a full program 

listing is given in order that you may tr> the 
program out yourself 

6.2 Program Description 

The 'firs' part of 'he program contained in 
Section 63 illustraaes some of rhe marry shapes 
that con be plotted on the screen using the 
SUPER EXPANDER high-resolution groph.es set. 
The second part of tne program Incorporates 

music Into the program while the cot responding 
no tes are actually being drown on o music stave 
on the screen 

6.3 Program Listing 

The following is a complete listing of the 

program. 

6 REM All CYAN SCREEN 
8 POKE36B79.59 
10GOSUB12M 



522 



7spaces ARTWORK" :GOSUBI300 

16 FORG'ITOIOBNEXT 

17 REM SELECT GRAPHICS 

18 GRAPHO 

19 REM StLECT COLORS 

20 CQLOR3,3,9,10 OOSUBI 50? 
GO5UB2I00 

30 REM DRAW SQUARE 

35 CHAR 1 8,7, "SQUARE" GOSUB 

2500 
40 DfcAW2,40O,43flTO6O(),458: 

GOSUB2900 
60 DRAW2TO680,6S0 GOSUB5O00 
80 DRAW2TO4O0.65O .GOSUB200O 
100 DRAW2TO4O0 450 GOSUB2000 

5CNCIR:GOSUB15O0 
130 REM DRAW CIRCLE 
135 CHAR18.7, "CIRCLE" GOSUB250B 
140 CIRCLE2 ,512 ,512,70,106 GOSUB 
2 IflO.SCNCLR GOSU B 1 500 



1 78 REM DRAW TRIANGLE 
I75CHAR18.7. TRIANGLE" 

eos ■&:=* 

180 DRAW7,550,45OTO35O,65O: 

GOSUB2000 
200 ORAW2TOi50,65fl:GOSUB2flflO 
220 DRAW2TO550.450 : GOSUB2«M. 

5CNCLR:GOSUB1500 
250 REM DRAW ELLIPSE 
255 CHAR18,8,"EIUPSE":GOSUB2500 
260 CIRCLE2,512.512.200.1O0:GOSUB 

2ie0SCNCLR:GOSUB15OO 

300 rem draw arc 

305 CHAR1B.y:aRC'.GOSUB2500 

31 CIRCLE2,512.512.70,I00.25,75 

GOSUB2 100:SCNCLR:GOSISBI 500 
350 REM PLOT POINTS 
355 CHAR18,8."POINTS" GOSUB2580 
368 POlNT2.48B,458,480.650.6OO 

650,600.450iGOSUB2IOO 

SCNCLR:GOSUB1500 
495 CHAR1B,3,"PAINTED CIRCLE"- 

GOSUB2500 
580 CIRCU2 J12 jl3.70,1B&GOSUa 

21B0;REGIQN7 
505 REM PAINT SHAPES 
51 PAINT2512.512 GOSUB21B0- 

SCNCLR-GOSUB1500 
535 REGIONBrCHARlBJ.' PAINTED 

SQUARE' GOSUB2500 
540 DRAW2.40e.450TO6O0.450. 

GOSU83180 
550 DRAW2TO600,650.GOSUB21BO 
568 DRAW2TO400,650;GOSUB2100 
578 DRAW2T0498.45&GOSUB719B 
580 REGION2.PAINT25125I2: 

GOS«JB2IOO:SCNCLR:GOSUB 

1508 
605 REGION0GHAR18.3, PAINTED 

ELLIPSE". GOSUB2500 
610 ORCU2512J12.208, IBB GOSUB 

2180 
620 REGiON6:PAINT2.51 3,512- 

GOSUB2188:SCNCLR:GOSU8 

1588 
645 REGION0:CHAR183. "PAINTED 

TRIANGLE" GOSUB2500 
650 DRAW2,5S0,4SOTO35O,650 

GOSUB2100 
660 DRAW2TO750.650 GOSUB21O0 



670 DRAW2TOS5O45OGOSUB2180 
6B0 REGIOM5:PAINT2512J12: 

GOSUB2WRECION0 
681 REM MUSIC MAKING 
686 GRAPHO;GOSUB1200 



S87PR*1T 






SspocesMLlSlC".GOSUBI300. 
GRAPHIC2 GOSUB300B 

690 REM PLAY CHORD 

691 SOUND225.225.225,0,9 FORG=l 
rO2O08 : NEXT:SOUNDO,8,O,8* 
GO5UB300B 

695R=480 

697 REM DRAW STAfF 

700 DRAW2. 1 .RT0999.R GOSUB2100 

7 10 R^ R • 180 IFR>800THEN73B 

720 GOT07BB 

725 REM DRAW CLEF 

730 QRCLE2 280,900,7.1 4 

740 DRAW2J00.990,TO200^25 

750 CIRCLE2208,400i2.7575J5 

768 CIRCLE2 J0B,663.I3O,1 96^5,75 

778 ORCLE2 JOa,7O0,10O,147,7S,25 

775 CIRCLE2 ,200.625,68.80^75 

780CIRCLE2J5a.660,7.14 

790 GOSUB2500 

795 REM DRAW NOTES 

3fl0R»30O;Rl=rOe,A=0 

805 REGIONO 

818 CIRCLE2.R.R 1.28.48 

812 DRAW2,R.28,RiTOR*28.Rl-288 

815A=A-1.0NAGOSUB915.92e, 

925,930,«5,940,945.95B 
828R=R-r98.Rl=Rl-5B 
B38 IFR>lB80TriENGOSuB1000 
840 OOTO810 
855 REM PLAY NOTES 



915 PRINT" ■■■■ and 
V9T6S202C" RETURN 



920 PRINT MfltsssV ond 
V9T6S2O20":RETURN 



975 PRINT" MeM ond 

V9T6S202E .RETURN 



930 PRINT" H.B ond 
V?T65202F":RETURN 



935 PRINT" ■■■■ and 
V9T6S202G" RETURN 



948 PRINT" ^■ksssS and 
V9T6S202A" RETURN 



945 PRINT" ■■■ ond 
V7T6S202B" RETURN 



950 PRINT" MkVM and ^B 

V9T6S203T7C" RETURN 
1000 r-ORG»lTO580:NEXT 
1882 REM DISPLAY NOTES 
1005AAS-'V9T4.S2O2" 
I006REC-ION6 

1007 CHAR4.6,"C" PRINT AASCR". 
1010 CHAR4.7."D"PRINT"DR"; 
1015 CHAR4,8,"E":PRINT"ER", 
I02OCHAR4.9."F"PRIK- 
1025 CHAR4,I0,'G" PRINT GR , 
l038CHAR4.il, A'-.PRINT'AR", 
1335CHAR4,l2,'B";PfilNT"BJr 
1048 CHAR4,13."C":PRINT"T803C" 
1050 FORG- 1 TO2O0O.NEXT SCNCLR 
1067GRAPHIC8:END 
1 195 REM REMOVE SCREEN 
1200 POKE36865.159:RETURN 
1295 REM SCROLL SCREEN 
1300*1 »36865:FORJ=150TO35STEP 1. 

POKEX1J FORG=lT018NEXTG. 

J:RETURN 
1500CHAR2A"ARTWORK" GOSUB 

25W RETURN 



2000 PRINT" MHbM and I 
V9T2S303C":FORS- 1 TO5O0 
NEXTRETURN 
21 00 FOROQ= 1 TO508NEXT RETURN 
2508 FORW=lTO lOOOiNEXTiRETURN 
3008 CHAR2.7, "MUSIC; RETURN 
38010 REM SUPER 
30015 REM EXPANDER 
30020 REM DEMO 



NOTES 









INDEX 






Adding carriage returns 


5 


Grid 


6 


Alio voce 


11.13 


High-rcsol ution graphics modie 
Indirect mode 


7.8,9 


Arc. drawing on 
Auxiliary color 


9 


2 


2.6 


Joystick, values relumed by the 


1,16,17 


Axis, * and y 


6 


KEY 


2.< 


BASIC, comparability with VIC 


U 


Key. RESTORE 


3.12 


Boss voice 


11.13 


Keys, function 


1,2 


Border color 


2.6 


Light Pen, values returned by the 


1 


Carnage returns, addi ng 
Cartndge, loading the SUPER 


5 


Lines, drawing 


8 




loodinig the SUPER 




EXPANDER 


1 


EXPANDER cartridge 


I 


Changing function key assignment 


< 


Matrix screen 


6,7 


CHAR 


2.9 


Memoxy Lxponsion board, VIC1010 1 


Choractei color 


2.7,8.9 


Memory, extra RAM 


13 


Character color, changing the 


7.8 


Mode, entering music 


12 


Character sol, musical 


12 


high-resolution graph) cs 


7.8.9 


Chord, ploying o musical 


11 


multi-color graphics 


6,7,8,9 


CIRCLE 


2.3,9 


Mulll-COlar graphics mede 


6,7,8,9 


Circle, drawing a 


9 


Music characterdtsplay.initializing 12 


Clearing a graphics screen 
COLOR 


14 


terminating 1 2 


2,7,8,15 


Music character set 


12 


Color, changing the character 


7.8 


Music mode, entenng 


12 


Color registers 

Color volues 


6,7,8,9.15 


Octave selection 


13 


6 


Origin, screen 

Paddles, values returned by the 


6 


COLOR 


2 


1.16 


Commends, enienng SUPER 




PAINT 


2,7,9 


EXPANDER 


2 


Painting graphics shopes 


•.» 


Commands, list of 


2 


Plotting graphics 
POINT 


' t 


Conventions, format 


2 


2.8 


Coordinates, screen 


6,8.9 


PRINT 


11,12,15 


Debugging 

Dired mode 


17 


Printing music 


11.12 


2 


Programs, running SUPER 




Disploymg music characters 


12 


EXPANDER 


3 


DRAW 


9 


Programs, terminating SUPER 




Drawing an arc 


9 


EXPANDER 


3 


a circle 


9 


RAM. extra memory 


1,3 


an ellipse 


9 


Range of screen coordinates 


6 


a line 


a 


RCOLR 


15 


Ellipse 


9 


Read i unctions 


2,15,17 


Entering single-note music mode 


12 


Rectangles, drawing 


8 


Errors, indication of 


3 


RDOT 


2.16 


Expansion, memory 


2 


REGION 


2.7.15 


Flat, playing a music riole 


u 


Registers, color 


6.7.8,9.1 5 


Function keys: 




sound 


11,15 


addi ng carriage returns to Itie 


5 


RESTORE key 


y 2 


changing the va lues, of the 


IAS 


IRETURN1 


1 


preassigned values of the 


?.' 


RGR 


2,15 


Gradion 


9 


RJOY 


16,17 


GRAPHIC 


2.7.15 


RPEN 


2,16,17 


Graphics mode, high-resolution 


w 


RPOT 


2,14,17 


mixed 


6.7.9 


RSND 


2,17 


multi-color 


6.7,8,9 







Scnen Jaoiiufl o ynphio 


10 


bordei 


6.7 


color 


6.7.B 


coordinales 


6,8? 


>Tta'r.» 




origin 


• 


SCNCLR 


2,10 


Sharp, playing a music note 

SOUND 


U 


2,li.l5 


Sound registers 


11 15 


Tempo, sitting "toiic 


14 


lerminotion a! SUPER 




EXPANDFR programs 


3 


Tor mutation of muSiCCt'J 




.^ spray 


12 


Test display 


6 


■ jtce 


11.13 


Inongles 


8 


VIC 1010 Memory Expansion 




Board 


1 


Voice 


11 13 


Volume, setting multi-no'e 


II 


.r;: Single note 


13 


VVKile noise, creating 


11.13 


Zero pom' of screen coordinaies 


t 









SUMMARY 

(continued from back covw) 



The parameters in ihe command formats ore 

listed below. 

n an integer number 
"entry" o user-defined command 

sc screen background color 

bo screen border color 

en character color 

ay auxiliary color 

cr color register 

n,y coordmotes of a DO" 1 * on the screen 

c COilOr 

rx ha If the width of a circular shape 

ry half the height of a circular shape 

OS starting point of on ore in gradians 

of fin uhmg po<nt of an arc in gradians 

"text" character stung 

si -54 sound voices 

s5 volume level 

p a single music note in the range C to B 

z any number between 9 and 255 

w a number in the range lo 3 

u a number m ihe range I to 5 

K eilhei or 1 



The cole 

be'ow 



ind their associated* 



Block 

1 While 

2 Red 
3Cyon 

4 Purple 

5 Green 

6 Blue 

7 Yellow 

8 Orange 

9 Lighi Orange 

10 Pink 

1 1 Lighi Cyan 

12 Lighn Purple 

13 Lighr Green 

14 Light Blue 

15 Lighr Yellow 






The commands that arc assigned to the 
function keys when the SUPER EXPANDER 
cartridge Is initialized are listed below 
KEY 1. "GRAPHIC" 
KEY 2. "COLO*" 
KEY 3, "DRAW- 
KEY 4. "SOUND- 
KEY 5, "CIRCLE- 
KEY 6, "POINT- 
KEY 7. "PAINT- 
KEY 8, "LIST"- CHRS( 13] 



22